The present invention relates to according method, a coding apparatus and a recording medium for coding input image data, and to a decoding method, a decoding apparatus and a recording medium for decoding coded image data.
In accordance with the improvement in digital signal processing technology, apparatuses capable of compressing, coding and recording digital image signals and capable of decoding, decompressing and reproducing digital image signals have been accomplished; and DVC (Digital Video Cassette) can be taken as an example. The format of the DVC is described in the Specifications of xe2x80x9cConsumer-Use Digital VCRs using 6.3 mm magnetic tapexe2x80x9d compiled by the HD Digital VCR Association.
In digital image apparatuses including DVC, since the amount of input image data is large, the amount of data is decreased by compression and coded, and the coded image data is decoded so as to be reconstructed to original images by decoding, as a general practice.
FIG. 25 is a block diagram illustrating the configuration of a coding portion in a conventional digital image apparatus. In FIG. 25, the numeral 2501 represents a first input terminal, the numeral 2502 represents a first signal format conversion portion, the numeral 2503 represents a switch, the numeral 2504 represents a second input terminal, the numeral 2505 represents a second signal format conversion portion, the numeral 2506 represents a shuffling portion, the numeral 2507 represents an orthogonal transform portion, the numeral 2508 represents a variable-length coding portion, and the numeral 2509 represents a coded image output terminal.
An example of an image signal to be coded for recording is a YUV 422 component signal comprising a luminance (Y) signal, a first color difference (U) signal and a second color difference (V) signal in a ratio of 4:2:2. When this YUV 422 component signal is input from the first input terminal 2501, it is converted into a YUV 411 component signal (hereinafter referred to as a YUV format signal) comprising four Y signals, one U signal and one V signal as the number of pixels per frame by the first signal format conversion portion 2502 as shown in FIG. 26.
On the other hand, an image signal other a YUV format signal, for example, a digital RGB component signal (hereinafter referred to as an RGB format signal) comprising a red (R) signal, a green (G) signal and a blue (G) signal may sometimes become an input signal. In this case, the RGB format signal input from the second input terminal 2504 is required to be converted into a YUV format signal by the second signal conversion portion 2505. The RGB format signal has horizontal pixels in the ratio of 4:4:4 per frame as shown in FIG. 27. In the second signal format conversion portion 2505, by using the RGB pixel values on the respective coordinates,
Y=0.30R+0.59G+0.11B
U=0.70Rxe2x88x920.59Gxe2x88x920.11B
V=xe2x88x920.30Rxe2x88x920.59G+0.89B
are obtained; furthermore, the numbers of the horizontal pixels of the U and V signals were thinned out to xc2xc to obtain a YUV format signal.
The YUV format signal obtained by the second signal format conversion portion 2505 is supplied to the shuffling portion 2506 via the switch 2503, and processed hereinafter in the same way as described above.
The Y signal, U signal and V signal of the YUV signal sent tothe shuffling portion 2506 are each divided into a block comprising M horizontal pixels and N vertical pixels (usually, M=N=8). Four blocks of Y signal, one block of U signal and one block of V signal located in the same region of a display screen are defined as a macro block. By using this macro block as a unit, a sync block used as a coding unit is formed of five macro blocks located at separate positions in a frame as shown in FIG. 28.
The shuffled image signal is sent to the orthogonal transform portion 2507, and subjected to orthogonal transform (usually, discrete cosine transform) in block units. The image signal subjected to orthogonal transform is sent to the variable-length coding portion 2508, and coded so that the amount of codes in the above-mentioned sync block is not more than a specific value. By carrying out the above-mentioned shuffling, the amount of codes required for each sync block is averaged for the entire frame, and coding can be carried out efficiently; furthermore, even if errors remain during reproduction, they disperse on the whole display screen, whereby the errors become less conspicuous. The coded image signal is output from the coded image output terminal 2509.
The variable-length coding portion carries out variable-length coding for a set of zero run, i.e., the number of continuous 0s, and value, i.e., the value of non-zero coefficient following the zero run, for the coefficient string subjected to orthogonal transform. FIG. 29 is a variable-lengthcoding table for DVC.
In the variable-length code for DVC, the code length is 3 bits or more and 16 bits or less, and the code length is determined uniquely by its high-order 8 bits. Furthermore, it is characterized that a code word having a shortercode length is assigned as the probability of occurrence is higher. The end of a series of code words is referred to as EOB.
Variable-length coding operation will be described below by using FIGS. 29 and 30.
It is assumed that coding has been completed up to coefficient A (coefficient value 9) in FIG. 30. The portions to be coded next are 3 continuous 0s and non-zero coefficient 2 (coefficient group B) following thereto. At this time, the zero run is 3, and the value is 2. According to FIG 29, the coefficient group B is coded as xe2x80x9c111001000.xe2x80x9d
Following the coefficient group B, coefficient C located immediately after the coefficient group B is coded. Since xe2x80x9c0xe2x80x9d is not present between the coefficient group B and the coefficient C, the zero run is 0 at this time. Since the value is xe2x88x926, the coefficient C is coded to xe2x80x9c101111xe2x80x9d according to FIG. 29.
FIG. 31 is a block diagram illustrating decoding for decoding variable-length coded image signals to obtain an ordinary image signal. In FIG. 31, the numeral 3101 represents a coded image input terminal, the numeral 3102 represents a variable-length decoding portion, the numeral 3103 represents an inverse orthogonal transform portion, the numeral 3104 represents a deshuffling portion, the numeral 3105 represents a first signal format conversion portion, the numeral 3106 represents a first signal output terminal, the numeral 3107 represents a second signal format conversion portion, and the numeral 3108 represents a second signal output terminal.
A coded image signal (a code word string) having been input to the coded image input terminal 3101 is decoded by the variable-length decoding portion 3102. In the case when a code word string is decoded according to the variable-length coding table of FIG. 29, the following methods can be considered.
A first method is a method wherein a code word string is scanned bit by bit until its code length (code word) is determined, and the zero run and value of the determined code word are output referring to the table. This method will be described by using FIG. 32.
In FIG. 32, 3-bit data from the head of a code word is taken as a candidate, and a judgment as to whether the code length is determined is made (corresponding to the description indicated by code a in FIG. 32). If the code length is not determined, a code word additionally having the next 1-bit data is taken as a candidate, and a judgment as to whether the code length is determined is made (corresponding to the description indicated by code b in FIG. 32). This operation is repeated until the code length is determined, whereby the code word is determined (corresponding to the description indicated by code c in FIG. 32).
Next, the table is made reference to with respect to the determined code word, and its zero run and value are obtained (corresponding to the description indicated by code d in FIG. 32).
As a result, one codeword has been decoded; therefore, the amount of the code word (7 bits in this case) is deleted from the head of the code word string, and the head of the next code word is taken out.
The above-mentioned operation is repeated until the EOB appears again. (Variable-length decoding method 1)
As a second method, a method of preparing a table for all code words can be used. In the case of DVC, since the maximum code length is 16, decoding can be carried out immediately by referring to a table wherein 16-bit data is input, and the code length, zero run and value corresponding to each bit pattern are output as shown in FIG. 33 (variable-length decoding method 2).
Data subjected to variable length decoding is decoded into the YUV format signal in block units by the inverse orthogonal transform portion 3103. After this, operation opposite to shuffling is carried out by the deshuffling portion 3104, and the signal is converted into a YUV 422 component signal, for example, by the first signal format conversion portion 3105, and output from the first signal output terminal 3106. On the other hand, when an RGB format signal is output, an RGB format signal is obtained from a YUV format signal by the second signal format conversion portion 3107, and output from the second signal output terminal 3108.
The above-mentioned process can also be carried out by using an arithmetic processing apparatus, such as a computer. In other words, by implementing the above-mentioned coding and decoding processing via software, the processing can be done by using a computer wherein an external memory 3401, a CPU 3402 comprising a cache memory, registers and an arithmetic unit, and a hard disk 3404 are connected to one another via a data bus 3403 as shown in FIG. 34. By this implementation of the coding and decoding processing via software, image data on a recording medium, such as a hard disk, connected to the computer can be coded and recorded on DVC; and coded image data recorded on DVC can be directly taken in the computer and subjected to decoding processing so as to be indicated on a monitor connected to the computer.
However, when the above-mentioned coding and decoding are carried out by using a computer, the following problems occur.
When image data is coded, or coded image data is decoded by using a computer, an enormous amount of data is required to be computed in a very short time.
For example, when an NTSC image signal is coded or decoded, (1) during coding, it is necessary to carryout signal format conversion, orthogonal transform and variable-length coding for 1-frame image data comprising 720 horizontal pixels and 480 vertical pixels within {fraction (1/30)} second, and (2) during decoding, it is necessary to carry but variable-length decoding, inverse orthogonal transform and signal format conversion for coded 1-frame image data within {fraction (1/30)} second. Otherwise, coding and decoding cannot be accomplished in real time without frame dropout.
When an RGB format signal is input, and when the coding processing shown in FIG. 25 is carried out by using a computer, the flow of data is shown in FIG. 35. The input RGB format signal is mapped in an area of the external memory 3401 (corresponding to the dotted line indicated by the numeral 3551). The mapped RGB format signal is transferred to the CPU 3402 (3552), subjected to computation for converting the signal into a YUV format signal (3553), and written once to another area of the external memory 3401 (3554). Next, in accordance with the addresses obtained depending on a shuffling pattern, the image signal is read from the external memory 3401 in block units, transferred to the CPU 202 (3555), and subjected to orthogonal transform and vertical-length coding (3556), whereby a coded image signal is output via the data bus 3403 (3557).
When the decoding processing shown in FIG. 31 is carried out by using a computer, the coded image signal transferred via the data bus 3403 is taken in the CPU 3402 (corresponding to the dotted line indicated by the numeral 3651 in FIG. 36), subjected to variable-length decoding and inverse orthogonal transform (3652), and transferred once to the external memory 3401 to carry out deshuffling (3653) as shown in FIG. 36. Next, in accordance with the addresses obtained depending on a deshuffling pattern, the signal is transferred from the external memory 3401 to the CPU 3402 so as to be subjected to signal format conversion (3654), and converted into an RGB format signal by the CPU 3402 (3655), and transferred again to the external memory 3401 (3656). By mapping the image signal stored in the external memory 3401 over a display device, such as a VRAM, image display and recording can be carried out.
Data transfer between the external memory 3401 and the CPU 3402 usually takes a longer time than data transfer between the registers or between the cache memory and the registers inside the CPU. In the conventional example, data transfer is carried out four times between the external memory 3401 and the CPU 3402, and this may impair real time image processing depending on the architecture of the computer.
Next, in the case of coding and decoding using orthogonal transform, it is necessary to carry out orthogonal transform for both coding and decoding. However, since the orthogonal transform used for ordinary image signals is formed of complicated computation including multiplication of irrational numbers, a very long computation time or a large circuit is required.
Even the conventional example frequently uses butterfly computation wherein the sum and difference of two inputs are computed, in order to increase the speed of orthogonal transform computation. In this butterfly computation for two inputs, X0 and X1, an output value Y0, i.e., X0+X1, and an output value Y1, i.e., X0xe2x88x92X1, are computed. This computation is processed as described below when carried out on a computer.
(1) Input value X0 is set in register A.
(2) Input value X1 is set in register B.
(3) The output (X1) of register B is set in register C (a copy of X1 is created).
(4) The output (X0) of register A is added to the output (X1) of register B, and the result is set in register B (the computation of X0+X1).
(5) The output (X1) of register C is subtracted from the output (X0) of register A, and the result is set in register A (the computation of X0xe2x88x92X1).
(6) The output of register B is output as Y0.
(7) The output of register A is output as Y1.
Although the butterfly computation is a very simple computation as described above, it requires at least three registers when computation is carried out to obtain two computation outputs.
On the other hand, eight-dimensional orthogonal transform is frequently used for image coding, and in this case, it is necessary to carry out four sets of 2-input butterfly computations simultaneously. For this purpose, 12 registers are necessary in total.
However, Intel""s CPUs, most abundantly used in personal computers, have less number of registers; even the newest MMX-compatible CPU has only four integer registers and eight MMX registers. To compensate for lack of registers, data in some registers is saved on memory. Since the above-mentioned butterfly computation is carried out repeatedly for orthogonal transform, saving of register values on memory occurs frequently, thereby delaying execution time significantly.
As described above, the saving on memory at the time of butterfly computation causes a serious problem of increasing computation time for coding and decoding image signals and audio signals.
Furthermore, when the above-mentioned variable-length decoding method 1 and the variable-length decoding method 2 are programmed for variable-length decoding and executed by using a computer, the following problems occur.
In the case of the variable-length decoding method 1, it is necessary to use a branch instruction for judging whether a code word is determined at each scanning or not. However, when Intel""s Pentium, a dominant CPU in today""s computers, is used, each time a branch instruction is executed, processing information for high-speed processing, obtained before the branch information, is cleared. Therefore, the above-mentioned processing information must be obtained to carry out the following computation, and during this time, processing is interrupted. In the case of variable-length decoding for DVC, when scanning is carried out in bit units, a branch instruction must be executed 11 times at the maximum and three times on the average for one code word.
On the other hand, in the case of the variable-length decoding method 2, the required size of the table is required to hold three parameters, i.e., code length, zero run and value, for each input bit pattern. When it is assumed that each of these three parameters has 1 bit, the size of the table becomes 3xc3x97216=192 Kbytes. However, since the size of the cache memory built in the CPU is about 16 Kbytes in the case of the newest Pentium, the table described in the variable-length decoding method 2 cannot be stored wholly in the above-mentioned cache memory. For this reason, the content of the table to be made reference to is highly likely not to be stored in the cache memory. If the content of the table is not included in the cache memory, it must be transferred from the external memory to the cache memory, whereby processing time is extended significantly.
Even in both cases, problems occur because of the difficulty in carrying out the conventional coding and decoding in real time by using a computer.
In consideration of the conventional problems, the present invention is intended to provide a high-speed coding method, coding apparatus and coding program for carrying out coding by dividing input image data having a predetermined signal format into block units and by carrying out orthogonal transform in the above-mentioned block units, as well as a high-speed decoding method, decoding apparatus and decoding program for obtaining image data by subjecting coded data to inverse orthogonal transform and signal format conversion.
To achieve the above object, the present invention of claim 1 is a coding method for coding input image data in a predetermined signal format by dividing said image data into block units and by carrying out orthogonal transform in said block units, comprising:
a macro block forming step for forming a macro block from said plural blocks,
a signal format conversion step for converting said image data in said predetermined signal format into image data in another signal format,
an orthogonal transform step for orthogonally transforming said image data subjected to said signal format conversion, and
a coding step for coding the output of said orthogonal transform step, wherein
said signal format conversion step, said orthogonal transform step and said coding step are carried out continuously in said macro block units.
The present invention of claim 4 is a coding method in accordance with claim 1, wherein said input image data comprises red, green and blue signals, and image data obtained after said signal format conversion comprises luminance, first color difference and second color difference signals.
The present invention of claim 7 is a coding method in accordance with claim 1, wherein said input image data comprises luminance, first color difference and second color difference signals, and image data obtained after said signal format conversion comprises luminance, first color difference and second color difference signals having a configuration different from that before said conversion.
The present invention of claim 10 is a coding method for coding input image data in a predetermined signal format by dividing said image data into block units and by carrying out orthogonal transform in said block units, comprising:
a pixel value detection step for detecting input pixel values in said block and for judging whether all the pixel values in said block are identical or nearly identical or not, and
an orthogonal transforming step, wherein, in a block judged by said pixel value detection step that all the pixel values are identical or nearly identical, DC coefficient component values are generated from the value of one pixel in said block, and all AC coefficient component values are set to zero, and in other blocks, ordinary orthogonal transform computation is carried out.
The present invention of claim 13 is a coding method for coding input image data in a predetermined signal format by dividing said image data into block units and by carrying out orthogonal transform in said block units,
assuming that either the horizontal direction or the vertical direction is referred to as a first direction and the other is referred to as a second direction, and that said two-dimensional block has mxc3x97n pixels comprising m pixels in said first direction and n pixels in said second direction,
said method comprising:
a first orthogonal transform step for orthogonally transforming said input pixel values in said two-dimensional block in m pixel units in said first direction,
a pixel value detection step for detecting coefficient component values obtained at said first orthogonal transform step in n coefficient units in said second direction, and
a second orthogonal transforming step, wherein, in coefficients, detected by said pixel value detection step, comprising said n coefficients in said second direction and having identical or nearly identical coefficient values, DC coefficient component values are generated from the value of one coefficient in said n coefficients, and all AC coefficient component values are set to zero, and in others of said n coefficients, ordinary orthogonal transform computation is carried out.
The present invention of claim 16 is a coding method for coding input image data in a predetermined signal format by dividing said image data into block units and by carrying out orthogonal transform in said block units,
assuming that either the horizontal direction or the vertical direction is referred to as a first direction and the other is referred to as a second direction, and that said two-dimensional block has mxc3x97n pixels comprising m pixels in said first direction and n pixels in said second direction,
said method comprising:
a first orthogonal transform step for orthogonally transforming said input pixel values in said two-dimensional block in m pixel units in said first direction,
a pixel value detection step for detecting coefficient component values obtained at said first orthogonal transform step in n coefficient units in said second direction, and
a second orthogonal transforming step, wherein, in coefficients, detected by said pixel value detection step, comprising said n coefficients in said second direction and having coefficient values, all of which are 0 or nearly 0, DC coefficient component values for said n coefficients and all AC coefficient component values are set to zero, and in others of said n coefficients, ordinary orthogonal transform computation is carried out.
The present invention of claim 22 is a coding method for coding input image data in a predetermined signal format by dividing said image data into block units and by carrying out orthogonal transform in said block units.
at the time when output value Y0, i.e., X0+X1, and output value Y1, i.e., X0xe2x88x92X1, are generated from two input values X0 and X1 by at least orthogonal transform computation,
said method comprising:
first, an addition step for adding said X0 to said X1 to generate new X1,
second, a doubling step for doubling said X0 to generate new X0, and
third, a subtraction step for subtracting said new X1 from said new X0 to generate newer X0, wherein
said new X1 is used as output value Y0, and said newer X0 is used as output value Y1.
The present invention of claim 25 is a coding method for coding input image data in a predetermined signal format by dividing said image data into block units and by carrying out orthogonal transform in said block units,
at the time when output value Y0, i.e., X0+X1, and output value Y1, i.e., X0xe2x88x92X1, are generated from two input values X0 and X1 by at least orthogonal transform computation,
said method comprising:
first, a subtraction step for subtracting said X1 from said X0 to generate new X0,
second, a doubling step for doubling said X1 to generate new X1, and
third, an addition step for adding said new X0 to said new X1 to generate new X1, wherein
said new X1 is used as output value Y0, and said newer X0 is used as output value Y1.
The present invention of claim 28 is a coding method for coding input image data in a predetermined signal format by dividing said image data into block units and by carrying out orthogonal transform in said block units,
at the time when output value Y0, i.e., X0+X1, and output value Y1, i.e., X0xe2x88x92X1, are generated from two input values X0 and X1 by at least orthogonal transform computation,
said method comprising:
first, a first addition step for adding said X0 to said X1 to generate news X1,
second, a second addition step for adding said X0 to said X0 to generate new X0, and
third, a subtraction step for subtracting said new X1 from said new X0 to generate newer X0, wherein
said new X1 is used as output value Y0, and said newer X0 is used as output value Y1.
The present invention of claim 31 is a coding method for coding input image data in a predetermined signal format by dividing said image data into block units and by carrying out orthogonal transform in said block units,
at the time when output value Y0, i.e., X0+X1, and output value Y1, i.e., X0xe2x88x92X1, are generated from two input values X0 and X1 by at least orthogonal transform computation,
said method comprising:
first, a subtraction step for subtracting said X1 from said X0 to generate new X0,
second, a first addition step for adding said X1 to said X1 to generate new X0, and
third, a second addition step for adding said new X0 to said new X1 to generate new X1, wherein
said new X1 is used as output value Y0, and said newer X0 is used as output value Y1.
The present invention of claim 34 is a coding method for coding input image data in a predetermined signal format by dividing said image data into block units and by carrying out orthogonal transform in said block units,
at the time when output value Y0, i.e., X0+X1, and output value Y1, i.e., X0xe2x88x92X1, are generated from two input values X0 and X1 by at least orthogonal transform computation,
said method comprising:
first, a first addition step for adding said X0 to said X1 to generate new X1,
second, a shifting step for shifting said X0 used as a binary number by one bit to the MSB side to generate new X0, and
third, a subtraction step for subtracting said new X1 from said new X0 to generate newer X0, wherein
said new X1 issued as output value Y0, and said newer X0 is used as output value Y1.
The present invention of claim 37 is a coding method for coding input image data in a predetermined signal format by dividing said image data into block units and by carrying out orthogonal transform in said block units,
at the time when output value Y0, i.e., X0+X1, and output value Y1, i.e., X0xe2x88x92X1, are generated from two input values X0 and X1 by at least orthogonal transform computation,
said method comprising:
first, a subtraction step for subtracting said X1 from said X0 to generate new X0,
second, a shifting step for shifting said X1 used as a binary number by one bit to the MSB side to generate new X1, and
third, a second addition step for adding said new X0 to said new X1 to generate new X1, wherein
said new X1 is used as output value Y0, and said newer X0 is used as output value Y1.
The present invention of claim 40 is a decoding method for subjecting coded data to variable-length decoding, inverse orthogonal transform and signal format conversion to obtain image data,
at the time when the maximum code word length per code word for said coded data is n (n: a natural number),
said variable-length decoding step comprising:
(1) a first table reference step for referring to a first table by using j-bit data of said code word as an input, for outputting code-length-related information and decoded data from said first table when code length s is j or less, and for outputting code-length-related information and second table access information when code length s is j+1 or more, and
(2) a second table reference step for computing a second table address from said second table access information and said s-bit data of said code word, for referring to said second table in accordance with said second table address, and for outputting decoded data.
The present invention of claim 43 is a decoding method for subjecting coded data to variable-length decoding, inverse orthogonal transform and signal format conversion to obtain image data,
at the time when said coded data is a code word string subjected to variable length coding, the maximum code word length per code word of which is n (n: a natural number),
said variable-length decoding step comprising:
(1) a code word string obtaining step for obtaining j-bit data from the head of said code word string,
(2) a first table reference step for referring to a first table by using said obtained j-bit data as an input, for outputting code-length-related information and decoded data from said first table when code length s is j or less, and for outputting code-length-related information and second table access information from said first table when code length s is j+1 or more,
(3) a second table reference step for obtaining s-bit data from the head of said code word string, for computing a second table address from said second table access information and said s-bit data, for referring to said second table in accordance with said second table address, and for outputting decoded data, and
(4) a bit shifting step for obtaining code length s from said code-length-related information, for deleting the s-bit code from the head of said code word string, and for repeating this operation until the occurrence of an end code.
The present invention of claim 46 is a decoding method for subjecting coded data to variable-length decoding, inverse orthogonal transform and signal format conversion to obtain image data,
at the time when said coded data is a code word string subjected to variable-length coding, the maximum code word length per code word of which is in (n: a natural number),
said variable-length decoding step comprising:
(1) a code word string obtaining step for obtaining j-bit data from the head of said code word string,
(2) an expansion first table reference step, wherein a first table is made reference to by using said obtained j-bit data as an input, and when the sum of the code lengths of k or less continuous code words is j or less, code-length-related information for said k continuous code words and decoded data for each of said k or less continuous code words are output from said first table, and when code length s is j+1 or more, code-length-related information and second table access information are output from said first table, and
(3) a second table reference step for obtaining s-bit data from the head of said code word string, for computing a second table address from said second table access information and said s-bit data, for referring to said second table in accordance with said second table address, and for outputting decoded data.
The present invention of claim 49 is a decoding method for subjecting coded data to variable-length decoding, inverse orthogonal transform and signal format conversion to obtain image data,
at the time when said coded data is a code word string subjected to variable-length coding, the maximum code word length per code word of which is n (n: a natural number),
said variable-length decoding step comprising:
(1) a code word string obtaining step for obtaining j-bit data from the head of said code word string,
(2) a first table reference step, wherein a first table is referred to by using said obtained j-bit data as an input, when the sum of the code lengths of m or less continuous code words is j or less, and when the sum of the code lengths of said m continuous code words and the code word next to said m continuous code words is determined uniquely, information relating to the total code length of said m continuous code words and the code word next to said m continuous code words, decoded data for each of said m or less continuous code words, and second table access information regarding said code word next to said m continuous code words are output from said first table, and
(3) a second table reference step for gaining access to a second table by using said second table access information as an input and for outputting decoded data regarding said code word next to said m continuous code words.
The present invention of claim 73 is a decoding method for subjecting coded data to inverse orthogonal transform and signal format conversion to obtain image data,
at the time when output value Y0, i.e., X0+X1, and output value Y1, i.e., X0xe2x88x92X1, are generated from two input values X0 and X1 by at least inverse orthogonal transform computation,
said method comprising:
first, an addition step for adding said X0 to said X1 to generate new X1,
second, a doubling step for doubling said X0 to generate new X0, and
third, a subtraction step for subtracting said new X1 from said new X0 to generate newer X0, wherein
said new X1 is used as output value Y0, and said newer X0 is used as output value Y1.
The present invention of claim 76 is a decoding method for subjecting coded data to inverse orthogonal transform and signal format conversion to obtain image data,
at the time when output value Y0, i.e., X0+X1, and output value Y1, i.e., X0xe2x88x92X1, are generated from two input values X0 and X1 by inverse orthogonal transform computation and the like,
said method comprising:
first, a subtraction step for subtracting said X1 from said X0 to generate new X0,
second, a doubling step for doubling said X1 to generate new X1, and
third, an addition step for adding said new X0 to said new X1 to generate new X1, wherein
said new X1 is used as output value Y0, and said newer X0 is used as output value Y1.
The present invention of claim 79 is a decoding method for subjecting coded data to inverse orthogonal transform and signal format conversion to obtain image data,
at the time when output value Y0, i.e., X0+X1, and output value Y1, i.e., X0xe2x88x92X1, are generated from two input values X0 and X1 by atleast inverse orthogonal transform computation,
said method comprising:
first, a first addition step for adding said X0 to said X1 to generate new X1,
second, a second addition step for adding said X0 to said X0 to generate new X0, and
third, a subtraction step for subtracting said new X1 from said new X0 to generate newer X0, wherein
said new X1 is used as output value Y0, and said newer X0 is used as output value Y1.
The present invention of claim 82 is a decoding method for subjecting coded data to inverse orthogonal transform and signal format conversion to obtain image data,
at the time when output value Y0, i.e., X0+X1, and output value Y1, i.e., X0xe2x88x92X1, are generated from two input values X0 and X1 by at least inverse orthogonal transform computation,
said method comprising:
first, a subtraction step for subtracting said X1 from said X0 to generate new X0,
second, a first addition step for adding said X1 to said X1 to generate new X0, and
third, a second addition step for adding said new X0 to said new X1 to generate new X1, wherein
said new X1 issued as output value Y0, and said newer X0 is used as output value Y1.
The present inventory of claim 85 is a decoding method for subjecting coded data to inverse orthogonal transform and signal format conversion to obtain image data,
at the time when output value Y0, i.e., X0+X1, and output value Y1, i e, X0xe2x88x92X1, are generated from two input values X0 and X1 by at least inverse orthogonal transform computation,
said method comprising:
first, a first addition step for adding said X0 to said X1 to generate new X1,
second, a shifting step for shifting said X0 used as a binary number by one bit to the MSB side to generate new X0, and
third, a subtraction step for subtracting said new X1 from said new X0 to generate newer X0, wherein
said new X1 is used as output value Y0, and said newer X0 is used as output value Y1.
The present invention of claim 88 is a decoding method for subjecting coded data to inverse orthogonal transform and signal format conversion to obtain image data,
at the time when output value Y0, i.e., X0+X1, and output value Y1, i.e., X0xe2x88x92X1, are generated from two input values X0 and X1 by at least inverse orthogonal transform computation,
said method comprising:
first, a subtraction step for subtracting said X1 from said X0 to generate new X0,
second, a shifting step for shifting said X1 used as a binary number by one bit to the MSB side to generate new X1, and
third, a second addition step for adding said new X0 to said new X1 to generate new X1, wherein
said new X1 is used as output value Y0, and said newer X0 issued as output value Y1.
The present invention of claim 91 is a decoding method for subjecting coded data to inverse orthogonal transform and signal format conversion in block units to obtain image data, comprising:
an existence range detection step, wherein, when said coded information is decoded to orthogonal coefficient components, only the non-zero orthogonal coefficient components are detected, and by storing the positions of said orthogonal coefficient components inside blocks, the existence range of orthogonal coefficient components is detected in block units, and
an inverse orthogonal transforming step wherein, when the coefficient components other than DC components are all set to 0 by said existence range detection step, the pixel values of said blocks are replaced with said DC components or multiples of said DC components, and when coefficient components other than said DC components are present, ordinary inverse orthogonal transform is carried out.
The present invention of claim 94 is a decoding method for subjecting coded data to inverse orthogonal transform and signal format conversion in block units to obtain image data,
at the time when input pixels are divided into horizontal and vertical two-dimensional block units and transformed into orthogonal coefficient components by using orthogonal transform, and information obtained by coding said orthogonal coefficient components is decoded by using inverse orthogonal transform and the like,
assuming that either the horizontal or the vertical direction is referred to as a first direction and the other is referred to as a second direction, and that said two-dimensional block has mxc3x97n coefficient components comprising coefficient components in said first direction and n coefficient components in said second direction,
said method comprising:
an existence range detection step for detecting the existence range of non-zero orthogonal coefficient components in said first direction for said m coefficient component units when said coded information is decoded to orthogonal coefficient components, and
an inverse orthogonal transform selection step, wherein plural kinds of inverse orthogonal transform steps for transforming orthogonal coefficient components into pixel components are provided, and said inverse orthogonal transform steps are selected depending on said range detected by said existence range detection step.
The present invention of claim 97 is a decoding method for subjecting coded data to inverse orthogonal transform and signal format conversion in block units to obtain image data,
at the time when input pixels are divided into horizontal and vertical two-dimensional block units and transformed into orthogonal coefficient components by using orthogonal transform, and information obtained by coding said orthogonal coefficient components is decoded by using inverse orthogonal transform or the like; assuming that either the horizontal or the vertical direction is referred to as a first direction and the other is referred to as a second direction, and that said two-dimensional block has mxc3x97n coefficient components comprising m coefficient components in said first direction and n coefficient components in said second direction,
provided with a single or plural kinds of inverse orthogonal transform steps in said first direction and said second direction for transforming orthogonal coefficient components into pixel components,
said method comprising:
a first-direction existence range detection step for detecting the existence range of non-zero orthogonal coefficient components in said first direction for said m coefficient component units when said coded information is decoded to orthogonal coefficient components,
a first-direction inverse orthogonal transform selection step for selecting said first-direction inverse orthogonal transform steps depending on said range detected by said first-direction existence range detection step,
a second-direction existence range detection step for detecting the existence range of non-zero orthogonal coefficient components in said second direction for n coefficient component units after said first-direction inverse orthogonal transform, and
a second-direction inverse orthogonal transform selection step for selecting said second-direction inverse orthogonal transform steps depending on said range detected by said second-direction existence range detection step.
The present invention of claim 103 is a decoding method in accordance with claim 97, wherein, when said existence range detection is carried out, in the case when orthogonal coefficient components are rearranged by using zigzag scanning during coding, an existence range to be stored in each orthogonal transform unit in said first direction is set to the position of the last non-zero orthogonal coefficient component.
The present invention of claim 109 is a decoding method for subjecting coded data to inverse orthogonal transform and signal format conversion to obtain image data, comprising:
a decoding step for decoding coded data in a predetermined signal format,
an inverse orthogonal transform step for subjecting said decoded data to inverse orthogonal transform, and
a signal format conversion step for converting said image detain said predetermined signal format subjected to said inverse orthogonal transform into image data in another signal format, wherein
said decoding step, said inverse orthogonal transform step and said signal format conversion step are carried out continuously for data in a predetermined range.
The present invention of claim 112 is a decoding method in accordance with claim 109, wherein said image data in said predetermined signal format comprises luminance, first color difference and second color difference signals, and image data after signal format conversion comprises red, green and blue signals.
The present invention of claim 115 is a decoding method in accordance with claim 109, wherein said image data in said predetermined signal format comprises luminance, first color difference and second color difference signals, and image data after signal format conversion comprises luminance, first color difference and second color difference signals having a configuration different from that before conversion.